﻿@using FwProject.TypeNumber.Dto;
@model IEnumerable<TypeNumberInfoDto>
@section styles{

}
@{Layout = null;
    var i =Convert.ToInt32(ViewBag.trlength);
    var Id = ViewBag.RestaurantId;
}

@foreach (var item in Model)
{
    <tr >
        <td onclick= "removertr(this)">
            <i class="fa fa-close"></i>
        </td>
        <td>
            @item.Name
            @Html.Hidden($"DetailsInputDtos[{i}].TypeNumberName", item.Name)
            @Html.Hidden($"DetailsInputDtos[{i}].TypeNumberInfoId", item.Id)
            @Html.Hidden($"DetailsInputDtos[{i}].RestaurantTypenNumberInfoId", null)
            <input type="hidden" value="@Id" name="DetailsInputDtos[@i].Restaurantid">
            <input type="hidden" name="Count" id="Count" value="@item.Count" />
        </td>
        <td><input type="text" name="DetailsInputDtos[@i].Distributioncount" id="Distributioncount" value="0" oninput="setPrice(this)" class="input-sm form-control"></td>
        <td><input type="text" name="DetailsInputDtos[@i].Recoverycount" value="0" oninput="setPrice(this)" class="input-sm form-control"></td>
        <td><input type="text" name="DetailsInputDtos[@i].Givecount" value="0" oninput="setPrice(this)" class="input-sm form-control"></td>
        <td><input type="text" name="DetailsInputDtos[@i].Exchangegoodscount" value="0" class="input-sm form-control"></td>
        <td><input type="text" name="DetailsInputDtos[@i].TypeNumberPrice" id="Price" value="0.00" oninput="setPrice(this)" class="input-sm form-control"></td>
        <td><input type="text" name="DetailsInputDtos[@i].SumPrice" id="Sumprice" value="0.00" readonly="readonly" class="input-sm form-control"></td>
        <td><input type="text" name="DetailsInputDtos[@i].Damagecount" id="Damagecount" value="0" oninput="setPrice(this)" class="input-sm form-control"></td>
        <td><input type="text" name="DetailsInputDtos[@i].DamagePrice" id="DamagePrice" value="0" readonly="readonly" class="input-sm form-control"></td>
        <td><input type="text" name="DetailsInputDtos[@i].Backboxcount" id="Backboxcount" value="0" oninput="setPrice(this)" class="input-sm form-control"></td>
        <td><input type="text" name="DetailsInputDtos[@i].Backnumbercount" id="Backnumbercount" value="0" oninput="setPrice(this)" class="input-sm form-control"></td>
        <td><input type="text" name="DetailsInputDtos[@i].BackPrice" id="BackPrice" value="0" readonly="readonly" class="input-sm form-control"></td>
    </tr>
    i++;
}

@section scripts{

}



